/*
 * 易族智汇（北京）科技有限公司 版权所有。
 * 未经许可，您不得使用此文件。
 * 官方地址：www.javamall.com.cn
 */
package com.enation.app.javashop.core.client.feignimpl.member;

import com.enation.app.javashop.client.member.MemberWalletClient;
import com.enation.app.javashop.core.client.fallback.member.MemberWalletClientFallbackFactory;
import com.enation.app.javashop.core.handler.FeignConfiguration;
import com.enation.app.javashop.model.member.dos.MemberWalletDO;
import com.enation.app.javashop.model.security.ScanModuleDTO;
import com.enation.app.javashop.model.security.ScanResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * @author zs
 * @version v2.0
 * @Description: 会员预存款对外接口实现
 * @date 2021-12-21
 * @since v7.2.3
 */
@FeignClient(name = "member-service", fallbackFactory = MemberWalletClientFallbackFactory.class,configuration = {FeignConfiguration.class})
public interface MemberWalletClientImpl extends MemberWalletClient {

    @Override
    @GetMapping(value = "/client/members/member-wallet/{member_id}")
    MemberWalletDO getByMemberId(@PathVariable("member_id") Long memberId);

    /**
     * 会员钱包数据重新签名
     */
    @Override
    @RequestMapping(value = "/client/members/member-wallet", method = RequestMethod.GET)
    void reSign();

    /**
     * 修复预存款数据
     * @param memberWalletId
     */
    @Override
    @RequestMapping(value = "/client/members/member-wallet/repair/{wallet_id}", method = RequestMethod.GET)
    void repair(@PathVariable("wallet_id")Long memberWalletId);

    @Override
    @RequestMapping(value = "/client/members/member-wallet/scan-module", method = RequestMethod.POST)
    ScanResult scanModule(@RequestBody ScanModuleDTO scanModuleDTO);
}
